#!/bin/sh
#

ENV_REPLACER="s|APP_ICP|$APP_ICP|g"
ENV_REPLACER="$ENV_REPLACER; s|APP_COPYRIGHT_URL|$APP_COPYRIGHT_URL|g"
ENV_REPLACER="$ENV_REPLACER; s|APP_COPYRIGHT|$APP_COPYRIGHT|g"

sed -i "$ENV_REPLACER" /var/www/front/assets/*.js

node /var/www/api/index.js &
nginx -g "daemon off;"
